include ( ../mythconfig.mak )
include ( ../settings.pro )
include ( config.pro)

!exists( config.pro ) {
   error(Missing config.pro: please run the configure script)
}

TEMPLATE = lib
CONFIG += plugin thread
TARGET = mythcdg
target.path = $${LIBDIR}/mythtv/plugins
INSTALLS += target

uifiles.path = $${PREFIX}/share/mythtv/themes/default
uifiles.files = themes/default/cdg-ui.xml
uifiles_wide.path = $${PREFIX}/share/mythtv/themes/default-wide
uifiles_wide.files = themes/default-wide/cdg-ui.xml

installfiles.path = $${PREFIX}/share/mythtv
installfiles.files = cdg_settings.xml

INSTALLS += uifiles uifiles_wide installfiles

LIBS += -lmad

# Input
HEADERS += songtree.h songhandler.h songinfo.h dbcheck.h cdgsettings.h
HEADERS += CDGlib.h CDGWidget.h
HEADERS += unzip.h SimpleIni.h ConvertUTF.h
HEADERS += maddecoder.h decoder.h constants.h config.h CDGWidgetBase.h

SOURCES += main.cpp
SOURCES += songtree.cpp songhandler.cpp songinfo.cpp dbcheck.cpp cdgsettings.cpp
SOURCES += CDGlib.cpp CDGWidget.cpp
SOURCES += unzip.c ConvertUTF.c
SOURCES += maddecoder.cpp decoder.cpp CDGWidgetBase.cpp

opengl {
   SOURCES *= CDGWidgetGL.cpp background.cpp osd.cpp cdgclock.cpp
   HEADERS *= CDGWidgetGL.h background.h osd.h cdgclock.h
   DEFINES += USING_OPENGL
}
